<!doctype html>


<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>eventTargetTester (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>


  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>





<div class="colmask rightmenu">
<div class="colleft">
    <div class="col1">
      <!-- Column 1 start -->

<div id="title">
       <span class="fn">events.eventTargetTester</span>
</div>

<hr/>


  <h2>Classes</h2>
   
<br/>

  <div class="legend">
        <span class="key publickey"></span><span>Public</span>
        <span class="key protectedkey"></span><span>Protected</span>
        <span class="key privatekey"></span><span>Private</span>
  </div>



<h2>Enumerations</h2>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.events.eventTargetTester.KeyType"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.events.eventTargetTester.</span><span class="entryName">KeyType</span>
        : 
     </div>


     <div class="entryOverview">
       The type of key returned by key-returning functions (listen).
     </div>

     <div class="entryDetails">
       <div class="detailsSection">
          <b>Constants:</b>
          <table class="horiz-rule">
            <tbody>
              <tr><td>
                <span class="entryName">
                  NUMBER
                </span>
                <div class="entryOverview">
                  Returns number for key.
                </div>
             </td></tr>
              <tr><td>
                <span class="entryName">
                  UNDEFINED
                </span>
                <div class="entryOverview">
                  Returns undefined (no return value).
                </div>
             </td></tr>
           </tbody>
         </table>
       </div>
     </div>

  </td>


  <td class="view-code">
     <a href="closure_goog_events_eventtargettester.js.source.html#line113">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>




  <h2>Global Functions</h2>





<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.events.eventTargetTester.setUp"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.events.eventTargetTester.</span><span class="entryName">setUp<span class="args">(<span class="arg">listenFn</span>,&nbsp;<span class="arg">unlistenFn</span>,&nbsp;<span class="arg">unlistenByKeyFn</span>,&nbsp;<span class="arg">listenOnceFn</span>,&nbsp;<span class="arg">dispatchEventFn</span>,&nbsp;<span class="arg">removeAllFn</span>,&nbsp;<span class="arg">getListenersFn</span>,&nbsp;<span class="arg">getListenerFn</span>,&nbsp;<span class="arg">hasListenerFn</span>,&nbsp;<span class="arg">listenKeyType</span>,&nbsp;<span class="arg">unlistenFnReturnType</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Setup step for the test functions. This needs to be called from the
test setUp.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">listenFn</span>
        : <div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">Function that, given the same signature as goog.events.listen, will add listener to the given event target.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">unlistenFn</span>
        : <div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">Function that, given the same signature as goog.events.unlisten, will remove listener from the given event target.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">unlistenByKeyFn</span>
        : <div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">Function that, given 2 parameters: src and key, will remove the corresponding listener.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">listenOnceFn</span>
        : <div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">Function that, given the same signature as goog.events.listenOnce, will add a one-time listener to the given event target.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">dispatchEventFn</span>
        : <div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">Function that, given the same signature as goog.events.dispatchEvent, will dispatch the event on the given event target.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">removeAllFn</span>
        : <div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">Function that, given the same signature as goog.events.removeAll, will remove all listeners according to the contract of goog.events.removeAll.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">getListenersFn</span>
        : <div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">Function that, given the same signature as goog.events.getListeners, will retrieve listeners.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">getListenerFn</span>
        : <div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">Function that, given the same signature as goog.events.getListener, will retrieve the listener object.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">hasListenerFn</span>
        : <div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">Function that, given the same signature as goog.events.hasListener, will determine whether listeners exist.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">listenKeyType</span>
        : <div class="fullType"><span class="type">goog.events.eventTargetTester.KeyType</span></div>
        <div class="entryOverview">The key type returned by listen call.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">unlistenFnReturnType</span>
        : <div class="fullType">(<span class="type">goog.events.eventTargetTester.UnlistenReturnType</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">Whether we should check return value from unlisten call. If unlisten does not return a value, this should be set to false.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_events_eventtargettester.js.source.html#line69">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.events.eventTargetTester.tearDown"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.events.eventTargetTester.</span><span class="entryName">tearDown<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       Teardown step for the test functions. This needs to be called from
test teardown.
     </div>

   
  </td>


  <td class="view-code">
     <a href="closure_goog_events_eventtargettester.js.source.html#line102">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>



  <h2>Global Properties</h2>





<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.events.eventTargetTester.ALREADY_CHECKED_PROP"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.events.eventTargetTester.</span><span class="entryName">ALREADY_CHECKED_PROP</span>
        : <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
     </div>


     <div class="entryOverview">
       Expando property used on "listener" function to determine if a
listener has already been checked. This is what allows us to
implement assertNoOtherListenerIsCalled.
     </div>

  </td>


  <td class="view-code">
     <a href="closure_goog_events_eventtargettester.js.source.html#line148">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>





  <a name="goog.events.eventTargetTester.MAX_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.events.eventTargetTester.</span><span class="entryName">MAX_</span>
        : <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>
     </div>


     <div class="entryOverview">
       The maximum number of initialized event targets (in eventTargets
array) and listeners (in listeners array).
     </div>

  </td>


  <td class="view-code">
     <a href="closure_goog_events_eventtargettester.js.source.html#line166">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
      <!-- Column 1 end -->
    </div>

        <div class="col2">
          <!-- Column 2 start -->
          <div class="col2-c">
            <h2 id="ref-head">Package events</h2>
            <div id="localView"></div>
          </div>

          <div class="col2-c">
            <h2 id="ref-head">Package Reference</h2>
            <div id="sideTypeIndex" rootPath="" current="events.eventTargetTester"></div>
          </div>
          <!-- Column 2 end -->
        </div>
</div>
</div>

</body>
</html>
